Field of the Invention
The present invention relates to code obfuscation.
Description of the Related Art
Code obfuscation refers to the deliberate act of creating source or machine code that is difficult for humans to understand. Like obfuscation in natural language, code obfuscation may incorporate nonsensical or unintelligible content, excessive verbiage and the like in order to compose programmatic statements. Program code is often obfuscated to protect the intellectual property reflected in the program code and to prevent a malicious actor from reverse engineering a proprietary computer program. Mechanically, obfuscation tools achieve obfuscation by encrypting some or all of the program code, stripping out from the program code potentially revealing meta-data, renaming useful class and variable names to meaningless labels or adding unused or meaningless code to an application binary. Thus, a conventional obfuscation tool may be used to automatically convert straight-forward source code into a program that works the same way, but is much harder to read and understand.
Code obfuscation finds ready application in the use of scripted elements of a Web page distributed by a Web server over the World Wide Web. Generally, automated code obfuscation tools respond to a request for a Web page containing programmatic script elements such as script conforming to the Javascript type scripting language by identifying the script elements amongst the markup elements of the Web page and processing the clear script elements into obfuscated script elements and replacing the clear script elements in the Web page with the obfuscated script elements before serving the Web page to a requesting client. In the absence of an error in run-time interpretation and execution of the obfuscated script elements, no one is the wiser. However, when an error does occur, debugging becomes required.
Generally, debugging errant script elements in a Web page requires little more than reviewing a log of error messages to identify the errant code and also any corresponding variables and associated line numbers so as to correlate the errors with the offending portions of the code. But, once the script elements have become obfuscated, it may not be possible to identify a correlation between the offending portions of the code and respective entries in the error log.